<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <style>
        nav {
            text-align: center;
        }
        nav ul li {
            display: inline-block;
            list-style: none;
        }
    </style>
</head>
<body>


<nav>
    <ul>
        <li>
            <a href="index.php?shape=circle">圆形</a>
        </li>
        <li>
            <a href="index.php?shape=rect">矩形</a>
        </li>
        <li>
            <a href="index.php?shape=triangle">三角形</a>
        </li>
    </ul>
</nav>

<?php

/**
 * Created by PhpStorm.
 * User: aron
 * Date: 2019/5/8
 * Time: 7:56 PM
 */

include_once "../../Util/DebugUtil/DebugUtil.php";

include_once "Form.class.php";
include_once "Result.class.php";

$shape = key_exists("shape", $_GET) ? $_GET["shape"] : "";
$form = new Form($shape);
echo $form;

if (key_exists("calculate", $_GET)) {
    $result = new Result($shape);
    echo $result;
}

?>

</body>
</html>

